#include "utilityPredefine.h"
#include "GirdEntity.h"

GirdEntity::GirdEntity(void)
{
}

GirdEntity::~GirdEntity(void)
{
}

void GirdEntity::draw()
{
	glPushMatrix();
	
	Matrix4 mat = Matrix4::IDENTITY;//*matScale*matRot;
	mat.makeTransform(pos,scale,rot);
	mat = mat.transpose();
	//glLoadMatrixf(mat[0]);
	glMultMatrixf(mat[0]);
	glBegin(GL_LINES);
	glColor3f(1,1,1);
	for(double x=0; x<w ; x+=tile){
		glVertex3f(x,0,0);
		glVertex3f(x,h,0);
	}
	for(double y=0; y<h; y+=tile){
		glVertex3f(0,y,0);
		glVertex3f(w,y,0);
	}
	glEnd();

	glPopMatrix();
}